package cz.semjob.linguistic.reader.attribute.value.linguistic;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import cz.semjob.common.attribute.value.AttributeValue;



public class PartOfSpeechAttributeValue extends ALinguisticAttributeValue {
	
	
	private Map<String, AttributeValue> attrValues;
	
	
	public PartOfSpeechAttributeValue() {
		super();
		this.attrValues = new HashMap<String, AttributeValue>();
	}

	public void addAttrValue(AttributeValue value) {
		if (value != null) {
			attrValues.put(value.getAttrName(), value);
		}
	}
	
	public AttributeValue getAttrValue(String attrName) {
		return attrValues.get(attrName);
	}
	
	public AttributeValue getPOS() {
		return getAttrValue("POS");
	}
	
	public AttributeValue getCase() {
		return getAttrValue("Case");
	}
	
	public AttributeValue getNumber() {
		return getAttrValue("Number");
	}
	
	public AttributeValue getGender() {
		return getAttrValue("Gender");
	}
	
	public Collection<AttributeValue> getAttrValues() {
		return attrValues.values();
	}

	@Override
	public String toString() {
		return "PartOfSpeechTag [attrValues=" + attrValues + "]";
	}
	
	
	
	

}
